package com.lrkj.property.domain;

import java.math.BigDecimal;
import com.lrkj.common.annotation.Excel;
import com.lrkj.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 单元信息对象 tm_unit
 *
 * @author yajun_ren
 * @date 2021-07-22
 */
@Data
public class Unit extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private String id;

    /** 小区ID */
    @Excel(name = "小区ID")
    private String communityId;

    /** 机构ID */
    @Excel(name = "机构ID")
    private String deptId;

    /** 楼栋ID */
    @Excel(name = "楼栋ID")
    private String floorId;

    /** 单元编号 */
    @Excel(name = "单元编号")
    private String unitNum;

    /** 单元名称 */
    @Excel(name = "单元名称")
    private String unitName;

    /** 总层数 */
    @Excel(name = "总层数")
    private Integer layerNum;

    /** 单元面积 */
    @Excel(name = "单元面积")
    private BigDecimal unitArea;

    /** 数据来源 */
    private String dataSourceId;

    /** 祖级ID */
    private String ancestors;

    /** 数据状态（0正常 1删除） */
    private String statusCd;

    private String communityName;

    private String deptName;

    //楼编号
    private String floorNum;

    //楼名称
    private String floorName;

    //行政区域
    private String cityName;

    //总房间数
    private Integer roomNum;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("communityId", getCommunityId())
            .append("deptId", getDeptId())
            .append("floorId", getFloorId())
            .append("unitNum", getUnitNum())
            .append("unitName", getUnitName())
            .append("layerNum", getLayerNum())
            .append("unitArea", getUnitArea())
            .append("dataSourceId", getDataSourceId())
            .append("ancestors", getAncestors())
            .append("statusCd", getStatusCd())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }

    public static Unit createFloorId(String floorId){
        Unit bean = new Unit();
        bean.setFloorId(floorId);
        return bean;
    }
}
